package com.eken.bgm.model.project;

import java.util.List;

public class Entity {
	private String entityName;
	
	private List<Component> components;
	
	public Entity(String entityName, List<Component> components) {
		this.entityName = entityName;
		this.components = components;
	}
	
	public String getName() {
		return this.entityName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((entityName == null) ? 0 : entityName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Entity other = (Entity) obj;
		if (entityName == null) {
			if (other.entityName != null)
				return false;
		} else if (!entityName.equals(other.entityName))
			return false;
		return true;
	}
	
	
}
